-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: preserve join keys dtype #13170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
||
Return an Index of same shape as self and whose corresponding | ||
entries are from self where cond is True and otherwise are from | ||
other. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sinhrks I wish that could get some more uniformity w.r.t. Periods. I realize that there is a bug here with other
which I fixed in tseries/base.py/.where
, end up duplicating code here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its more complicated. I needed prelim logic different fro dti & period, so would have to have a helper function. We do this a fair amount, e.g. process for timezones, run a function, then reverse. Its ok the way we do it now, but it does duplicate some code.
79f3b9d
to
3c535fa
Compare
05d045a
to
10d52f6
Compare
ok, removed the dep on my other PR. @sinhrks @jorisvandenbossche @TomAugspurger comments? |
d864f2c
to
971ed21
Compare
@sinhrks any comments on this? |
closes pandas-dev#8596 xref to pandas-dev#13169 as assignment of Index of bools not retaining dtype
Index.where
method for all Index types (likenp.where/Series.where
), but preserves dtypes